In the directory that the path links to I have created subdirectories for each album. However the block only reads images from the first subdirectory. The only time pictures from the other albums show up in the block is when your in that album and click on a page number. You can see it here: http://truthiness.se/

I attached a screenshot of my configuration as requested in another thread.

CommentFileSizeAuthor
fast_gallery_conf.png25.59 KBManji

Comments

Manji’s picture

Got some more information about this issue. This seems to be a problem with version 1.3 and beyond. I tried to add another album tonight (something that I had not done since upgrading to 1.3). But all I got was this error messages:

imagesx(): supplied argument is not a valid Image resource in /hsphere/local/home/crazynutzo/truthiness.se/modules/fast_gallery/fast_gallery.cache.class.php on line 58.

imagesy(): supplied argument is not a valid Image resource in /hsphere/local/home/crazynutzo/truthiness.se/modules/fast_gallery/fast_gallery.cache.class.php on line 59.

imagecopyresampled(): supplied argument is not a valid Image resource in /hsphere/local/home/crazynutzo/truthiness.se/modules/fast_gallery/fast_gallery.cache.class.php on line 75.

imagedestroy(): supplied argument is not a valid Image resource in /hsphere/local/home/crazynutzo/truthiness.se/modules/fast_gallery/fast_gallery.cache.class.php on line 87.

I tried to upgrade to version 2.2 but the result was the same. So I tried to revert back to 1.2RC5 and that works fine. Though now I have no block at all (since that is not in this version).

ncy’s picture

there's a a very subtle bug here, but easy enough to fix. it's not really reading from just one album. it's doing a paged query, so it's reading only from the first page of pictures. since it should be a random image from all albums, it should be doing a regular db_query.

in fast_gallery.class.php

public function getRandomPicture(){
    $arPics = $this->getPicsFlat();
    $randId = array_rand($arPics);
    return $arPics[$randId];
}

change

    $arPics = $this->getPicsFlat();

to

    $arPics = $this->getAllPicsFlat();
ncy’s picture

also, for the

imagesx(): supplied argument is not a valid Image resource in /hsphere/local/home/crazynutzo/truthiness.se/modules/fast_gallery/fast_gallery.cache.class.php on line 58. .....

problems, it might be a matter of fixing your image files' extensions (i.e. .jpg, and not .JPG):

See:

#313858: Help getting this installed please

Manji’s picture

Installed 2.3 and your modification worked fine. I did your suggested modification for the upper/lower case file endings to and that seems to work also. I get no errors now.

Thanks for the fix!

ncy’s picture

Don't know if you scrolled to the bottom of #313858, but here's a better fix for the file extension problem (so you don't have to go through all your files renaming everything):

#315352: Internal Cache Only Works with Lowercase Image Extensions

cheers,

-nick

Manji’s picture

Yeah that's the one I did. :)

ncy’s picture

i made a new (unofficial) version that goes about extension comparisons in a different way. fixes some other things as well:

#316967: Alternative Version - New Features and Fixed Issues

rapsli’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.